package cn.maihe.elg.operation.supports.electronicseal.anne.service.impl;

import cn.maihe.elg.operation.config.AnneSignConfig;
import cn.maihe.elg.operation.config.ElgConfig;
import cn.maihe.elg.operation.supports.electronicseal.anne.AnneServiceName;
import cn.maihe.elg.operation.supports.electronicseal.anne.BaseAnneSignService;
import cn.maihe.elg.operation.supports.electronicseal.anne.bean.annesign.base.SecureApiRequest;
import cn.maihe.elg.operation.supports.electronicseal.anne.bean.annesign.base.SecureApiResponse;
import cn.maihe.elg.operation.supports.electronicseal.anne.bean.annesign.login.LoginResponseBody;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @Description 合同自动签署
 * @Author WJH
 * @Date 2021/08/13
 */
@Slf4j
@Service
public class AnneApiLoginService extends BaseAnneSignService<SecureApiRequest, SecureApiResponse> {


    public AnneApiLoginService(AnneSignConfig anneSignConfig, ElgConfig elgConfig) {
        super(anneSignConfig, elgConfig);
    }

    @Override
    protected AnneServiceName serviceName() {
        return AnneServiceName.login;
    }



    public LoginResponseBody login() {
        return this.getLoginResponseBody();
    }

    @Override
    public String getSecretKey() {
        return this.getLoginResponseBody().getSecretKey();
    }


}
